#include "Vector.h"

Vector::Vector() {
	this->x = 0;
	this->y = 0;
	this->z = 0;
}

Vector::Vector(float x, float y, float z) {
	this->x = x;
	this->y = y;
	this->z = z;
}

Vector::~Vector() {
}

/*
Vector
Vector::operator =(Vector& b) {
	this->x = b.x;
	this->y = b.y;
	this->z = b.z;
	return *this;
}

Vector
Vector::operator =(Vector b) {
	this->x = b.x;
	this->y = b.y;
	this->z = b.z;
	return *this;
}
*/
Vector& operator +(Vector& a, Vector& b) {
	a.x += b.x;
	a.y += b.y;
	a.z += b.z;
	return a;
}

Vector& operator -(Vector& a, Vector& b) {
	a.x -= b.x;
	a.y -= b.y;
	a.z -= b.z;
	return a;
}

float operator *(Vector& a, Vector& b) {
	return a.x*b.x + a.y*b.y + a.z*b.z;
}

Vector& operator *(Vector& a, float s) {
	a.x *= s;
	a.y *= s;
	a.z *= s;
	return a;
}

Vector& operator *(float s, Vector& a) {
	a.x *= s;
	a.y *= s;
	a.z *= s;
	return a;
}
